window.onload = function(){
	loadResources();
}

var resources = {
	backgroundImg:{path:"../images/fight/bg1.jpg"},
	hubao:{path:"../images/fight/hubao.png"}
}

var loadResources = function() {
	var loader = new PxLoader();
	for (var ele in resources) {
		resources[ele].image =loader.addImage(resources[ele].path);
	}
	loader.addCompletionListener(function(){
		//startup();
	}); 
	 
	// begin downloading images 
	loader.start(); 
}